body {
  background-color: aquamarine;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
}

.contenedor {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 50px;
}

.normal, .normal1 {
  position: relative;
  font-size: 20px;
  border-bottom: 1px dotted black;
  padding: 10px;
}


.normal .mensaje {
  visibility: hidden;
  width: 120px;
  background-color: black;
  color: white;
  text-align: center;
  border-radius: 6px;
  padding: 5px 0;
  position: absolute;
  top: -5px;
  left: 105%;
  z-index: 1;
}

.normal:hover .mensaje {
  visibility: visible;
}


.normal .mensaje::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 100%;
  margin-top: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: transparent black transparent transparent;
}


.normal1 .mensaje1 {
  visibility: hidden;
  width: 120px;
  background-color: black;
  color: white;
  text-align: center;
  border-radius: 6px;
  padding: 5px 0;
  position: absolute;
  top: -5px;
  right: 105%;
  z-index: 1;
}

.normal1:hover .mensaje1 {
  visibility: visible;
}

.normal1 .mensaje1::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 100%;
  margin-top: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: transparent transparent transparent black;
}


.normal2 {
  position: relative;
  display: inline-block;
  font-size: 20px;
  border-bottom: 1px dotted black;
}

.normal2 .mensaje2 {
  visibility: hidden;
  width: 120px;
  background-color: black;
  color: white;
  text-align: center;
  border-radius: 6px;
  padding: 5px 0;
  position: absolute;
  bottom: 100%;
  left: 50%;
  margin-left: -60px;
  z-index: 1;
}

.normal2:hover .mensaje2 {
  visibility: visible;
}


.normal2 .mensaje2::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: black transparent transparent transparent;
}

.normal3 {
  position: relative;
  display: inline-block;
  font-size: 20px;
  border-bottom: 1px dotted black;
}

.normal3 .mensaje3 {
  visibility: hidden;
  width: 120px;
  background-color: black;
  color: white;
  text-align: center;
  border-radius: 6px;
  padding: 5px 0;
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -60px;
  z-index: 1;
}

.normal3:hover .mensaje3 {
  visibility: visible;
}

.normal3 .mensaje3::after {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: transparent transparent black transparent;
}

[class*="normal"]:hover {
  background-color: brown;
  color: aliceblue;
}
